﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace GameProject.ViewModel
{
    class GameMenuViewModel : ViewModelBase
    {
        private MainWindowViewModel mainWindowViewModel;

        public GameMenuViewModel(MainWindowViewModel mainWindowVM)
        {
            mainWindowViewModel = mainWindowVM;
        }

        public ICommand OpenEncyclopediaCommand
        {
            get
            {
                if (_OpenEncyclopediaCommand == null)
                {
                    _OpenEncyclopediaCommand = new RelayCommand(param => mainWindowViewModel.OpenEncyclopdia(), null);
                }
                return _OpenEncyclopediaCommand;
            }
        }
        private ICommand _OpenEncyclopediaCommand;

        public ICommand OpenWorldBuilderCommand
        {
            get
            {
                if (_OpenWorldBuilderCommand == null)
                {
                    _OpenWorldBuilderCommand = new RelayCommand(param => mainWindowViewModel.OpenWorldBuilder(), null);
                }
                return _OpenWorldBuilderCommand;
            }
        }
        private ICommand _OpenWorldBuilderCommand;
    }
}
